// Data.java

package com.ruoyi.service.entity.user;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.service.domain.ServiceLog;

import java.util.Date;

@lombok.Data
public class PCUserLog {


    /** 操作日志表主键ID */
    private Long logId;

    /** 操作日期 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "操作日期", width = 30, dateFormat = "yyyy-MM-dd")
    private Date actDate;

    /** 操作时间 */
    @JsonFormat(pattern = "HH:mm:ss")
    @Excel(name = "操作时间", width = 30, dateFormat = "HH:mm:ss")
    private Date actTime;

    /** 操作 */
    @Excel(name = "操作")
    private String action;

    /** 原因（说明） */
    @Excel(name = "原因（说明）")
    private String reason;

    /** 操作人 */
    @Excel(name = "操作人")
    private String actor;


    public void init(ServiceLog log) {
        this.logId = log.getLogId();
        this.actDate = log.getLogDate();
        this.actTime = log.getLogTime();
        this.action = log.getLogType();
        this.reason = log.getLogReasonexplanation();
        this.actor = log.getLogUserBy();
    }
}